<?php namespace app\common\controller;

/**
 * 错误码
 */
class Error{
	
	private $errCode = [
		'00000' => '操作成功',
		
		'40004' => '参数有误',
		
		'99996' => '请求超时,请重试',
		'99997' => '操作失败,请重试',
		'99998' => '错误码有误',
		'99999' => '暂无数据',
	];
	
	/**
	 * 查找CODE码对应说明
	 * @param  string	$code	错误码
	 * @return string CODE说明
	 */
    public function searchCode($code = '99998'){
    	if(isset($this -> errCode[$code])){
    		return $this -> errCode[$code];
    	}else{
    		return $this -> errCode['99998'];
    	}
    }
}
